package erp.education.web.action.setup.school;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ModelDriven;

import erp.education.client.setup.school.StudentExtraInfoRequest;
import erp.education.server.beans.interfaces.setup.school.StudentExtraInfoServiceI;
import erp.education.web.common.BaseAction;

public class StudentExtraInfoAction extends BaseAction implements
		ModelDriven<StudentExtraInfoRequest> {
	@Autowired
	StudentExtraInfoRequest studentExtraInfoRequest;
	@Autowired
	StudentExtraInfoServiceI studentExtraInfoService;

	public String studentExtraInfoLoad() throws Exception {

		this.result = studentExtraInfoService.studentExtraInfoLoadSevice(
				studentExtraInfoRequest).getResponseObject();
		getRequest().setAttribute("result", this.result.getResultList());

		return "studentextrainfo";
	}

	public String saveUpdateStudentExtraInfoDetails() throws Exception {

		this.result = studentExtraInfoService
				.saveUpdateStudentExtraInfoDetails(studentExtraInfoRequest)
				.getResponseObject();

		return "studentextrainfo";
	}

	@Override
	public StudentExtraInfoRequest getModel() {
		return this.studentExtraInfoRequest;
	}
}
